home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / PRG / Mac_F2C_1.3.2.sit / Mac F2C 1.3.2 / Mac F2C Libraries / libI77 Sources / rewind.c < prev    next >
C/C++ Source or Header  |  1995-01-28  |  408b  |  25 lines

  1. #include "f2c.h"
  2. #include "fio.h"
  3. #ifdef KR_headers
  4. integer f_rew(a) alist *a;
  5. #else
  6. integer f_rew(alist *a)
  7. #endif
  8. {
  9.     unit *b;
  10.     if(a->aunit>=MXUNIT || a->aunit<0)
  11.         err(a->aerr,101,"rewind");
  12.     b = &f__units[a->aunit];
  13.     if(b->ufd == NULL || b->uwrt == 3)
  14.         return(0);
  15.     if(!b->useek)
  16.         err(a->aerr,106,"rewind")
  17.     if(b->uwrt) {
  18.         (void) t_runc(a);
  19.         b->uwrt = 3;
  20.         }
  21.     rewind(b->ufd);
  22.     b->uend=0;
  23.     return(0);
  24. }
  25.